package com.come4loves.game.module.fight.model;

import com.come4loves.core.rhino.FormulaHelper;
import com.come4loves.game.module.fight.constants.BuffType;
/**
 * 表达式buff
 * @author jerry
 *
 */
public class ExpressionBuffData extends BuffData {
	private String expression;
	public ExpressionBuffData(int useId, BuffType buffType, int buffValue, int duration, String expression) {
		super(useId, buffType, buffValue, duration);
		this.expression = expression;
	}
	
	public String getExpression() {
		return expression;
	}
	public void setExpression(String expression) {
		this.expression = expression;
	}
	public float calculaValue(Integer... args){
		return FormulaHelper.executeFloorInt(expression, args);
	}

}
